package com.hzqy.web.ac;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hzqy.service.behaviorControl.BehaviorControlServiceBean;

@Controller
@RequestMapping("/industry/behaviorControl")
public class BehaviorControlAction{
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	@Autowired
	private BehaviorControlServiceBean behaviorControlServiceBean;
	
	
	/**
	 * 强切插件中 轮询查询强切计划
	 * 
	 * @param orgId 组织id
	 * @param serverid 业务账号
	 * @param timeSpan 时间间隔，单位(秒) 如果（当前时间 ~ 当前时间 + 时间间隔）时间范围内有新的强切计划，则返回强切计划
	 */
	@RequestMapping("/forced_switching_by_serverid")
	@ResponseBody
	public Object forcedSwitchingByServerid(int orgId, String serverid, int timeSpan){
		Map<String, Object> resultMap = behaviorControlServiceBean.forcedSwitchingByServerid(orgId, serverid, timeSpan);
		return resultMap;
	}
	
	
	
	
}